package yf.mall.entity;


import lombok.Setter;
import lombok.Getter;
import java.io.Serializable;
import java.util.Date;

import java.math.BigDecimal;

/**
 * 规则实体
 * 表名 shop_log_rule
 *
 * 
 * 
 * @date Wed Aug 19 17:10:55 CST 2020
 */
@Setter
@Getter
public class ShopLogRuleEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    //
    private Long id;
        //模板ID
    private Long logId;
        //省区
    private String province;
        //首重
    private String fw;
        //首重价格
    private BigDecimal fp;
        //超出价格单价
    private BigDecimal up;
        //ENUM-是否默认:"NO-否","YES-是"
    private Integer status;
    
    public ShopLogRuleEntity(){

    }

    public String[] getProvinces(){
        if (province != null && !"".equals(province)){
            return  province.split("_");
        }
        return new String[0];
    }

}
